package com.wisemoresystem.seal.action.seal.select;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.wisemoresystem.seal.base.action.ProjBaseAction;
import com.wisemoresystem.seal.service.SealSelect;

/**
 * 印章查询
 * @author Administrator
 *
 */
@Controller("ixSealSelect")
@Scope("prototype")
@RequestMapping("/ix/seal/select")
public class SealSelectAction extends ProjBaseAction{
	
	@Autowired
	private SealSelect service;
	/**
	 * 印章查询列表
	 * @param srh_bank_id 机构id
	 * @param srh_name 印章名称
	 * @param srh_num 数字
	 * @return
	 */
	@RequestMapping("/list")
	public ModelAndView list(String srh_bank_id,String srh_name,String srh_num) {
		
		List<Map<String, Object>> list = service.selectSealAll(srh_bank_id,srh_name,srh_num,page);
		ModelAndView mv = new ModelAndView("/jsp/seal/select/list");
		mv.addObject("list",list);
		return mv;
	}

	/**
	 * 详细列表
	 * @param srh_bank_id 机构id
	 * @return
	 */
	@RequestMapping("/detail")
	public ModelAndView detail(String srh_bank_id) {
		
		List<Map<String, Object>> list = service.selectSealDownDetail(srh_bank_id);
		List<Map<String, Object>> list2 = service.selectSealUpDetail(srh_bank_id);
		ModelAndView mv = new ModelAndView("/jsp/seal/select/detail");
		
		mv.addObject("list",list);
		mv.addObject("list",list2);
		return mv;
	}
}
